

//收藏到我的收藏夹公共方法

    var productsId;
	function myFavoriteAdd(productsId)
	{
	
	   if(window.XMLHttpRequest) {
              http_request = new XMLHttpRequest();
              if (http_request.overrideMimeType) {
                  http_request.overrideMimeType('text/xml');
                  }
          } else if (window.ActiveXObject) { 
                 try {
                           http_request = new ActiveXObject("Msxml2.XMLHTTP");
                     } catch (e) {
                     try {
                          http_request = new ActiveXObject("Microsoft.XMLHTTP");
                     } catch (e) {}
                }
           }
  
         if (!http_request) {
           window.alert("can't create XMLHttpRequest object.");
           return false;
         }
 
 
         url='/buy/manage/myFavoriteF.do?action=addById&id='+productsId;
         http_request.open("GET", url, true);
         http_request.onreadystatechange = processRequest;
         http_request.send(null);
	
	}
	
	
	 function processRequest() {
         if (http_request.readyState == 4) { 
           if (http_request.status == 200) {
	         var  buyer =http_request.responseText;
	         var result=buyer;
	         
	         
	          alert(result);
	          
	       //alert('decode:'+decode(result));
	              	           
           } else { 
             alert("Error");
           }
         }
       }